home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / FAQSYS18.ZIP / FAQS.DAT / QT_FAQ.18 / text0000.txt < prev   
Encoding:
Text File  |  1995-12-12  |  18.2 KB  |  512 lines

  1. This is the first draft of my QuickTime FAQ. If you have additional info,
  2. please contribute, there are still some major gaps.
  3.  
  4. (Note that I have set the Followup-To field to poster, which means that all
  5.  followups are mailed to me. If your news software doesn't support that, make
  6.  sure that you post to the appropriate group and maybe send me a copy of your
  7.  post. I might sometimes miss posts in alt.binaries, since I don't receive
  8.  these groups on my home machine)
  9.  
  10.  
  11.                 QuickTime FAQ
  12.  
  13.         ($Id: qt.faq,v 1.8 1994/09/18 23:18:45 alex Exp $)
  14.  
  15. This file attempts to answer some of the questions that appear frequently on
  16. alt.binaries.multimedia and other groups about QuickTime movie files. The FAQ
  17. is more centered on technical problems and not the QuickTime file format.
  18.  
  19.  
  20. 0. Meta
  21. 0.1 Copyright
  22. 0.2 How to get this document?
  23. 0.3 Notation, Abbreviation, etc.
  24. 0.4 Mirror sites
  25. 0.5 Additions
  26. 0.6 Contributors
  27.  
  28. 1. General
  29. 1.1 What is QuickTime?
  30. 1.2 Where to get documentation about the QuickTime file format?
  31.  
  32. 2. QuickTime software
  33. 2.1 Macintosh
  34. 2.2 PC/MS Windows
  35. 2.2.1 Sample ftp session
  36. 2.3 unix/X11
  37.  
  38. 3. Macintosh file formats
  39. 3.1 QuickTime
  40. 3.2 BinHex
  41. 3.3 MacBinary
  42. 3.4 Segmented files
  43. 3.5 Stuffit
  44. 3.6 Compact Pro
  45.  
  46. 4. Decoder/Convertor software
  47. 4.1 Macintosh
  48. 4.2 PC/DOS
  49. 4.3 unix
  50.  
  51. 5. Exchanging QuickTime files between Mac and other platforms
  52.  
  53. 6. Where to get QuickTime movies.
  54.  
  55.  
  56. 0. Meta
  57.  
  58. 0.1 Copyright
  59.  
  60. This file is copyright 1994 by Alexander Lehmann. This file may be copied and
  61. redistributed in whole or excerpts for any purpose. The author disclaims any
  62. responsibility about information contained in this file. You're on your own.
  63.  
  64. 0.2 How to get this document?
  65.  
  66. As long as this posting is not approved by news.answers, the file will not be
  67. available from any archive. The file will be posted regularly and is available
  68. >from the author by email.
  69.  
  70. 0.3 Notation, Abbreviation, etc.
  71.  
  72. Archive locations in this file use the URL notation, which is used in
  73. WorldWideWeb.
  74.  
  75. ftp://site.edu/pub/foo/bar would be the anonymous ftp archive at site.edu in
  76. the directory /pub/foo/bar.
  77.  
  78. Note that if a filename contains a space or other `unsual' character, it is
  79. encoded as 2digit hex number escaped with %, e.g. "File Name" -> File%20Name.
  80. If you access such a file with a terminal based ftp client, the name has to be
  81. enclosed in quotes. (see: sample ftp session)
  82.  
  83. Unless otherwise mentioned, all values are stored in big endian form.
  84.  
  85. 0.4 Mirror sites
  86.  
  87. Some of the FTP archives listed in this file have mirror sites, which might
  88. be nearer to you. If you use a mirror site instead of the root sites, this
  89. has a couple of advantages. The connection is probably faster, you take some
  90. load of the probably much more used server, and some archives have access
  91. restriction, which might be more relaxed with mirror sites.
  92. The easiest way for finding mirror sites is using archie to seach for the
  93. directory in which the file is contained or you can search for the filename.
  94.  
  95. The following sites have many mirror sites:
  96.  
  97. ftp://oak.oakland.edu/pub/msdos (also known as SimTel), e.g.
  98. ftp://ftp.informatik.rwth-aachen.de/simtel
  99.  
  100. ftp://sumex-aim.stanford.edu/info-mac (not all dirs are mirrored)
  101.  
  102. 0.5 Additions
  103.  
  104. If you have any additions or corrections for this file, please mail it to
  105. alex@hal.rhein-main.de. Please do not mail large files without prior
  106. notification, since this address receives mail over a telephone link, which
  107. costs money.
  108.  
  109. 0.6 Contributors
  110.  
  111. This file draws from a number of sources:
  112.  
  113. - articles in alt.binaries.multimedia and alt.binaries.pictures.d
  114. - the macutil source code
  115. - especially the following people:
  116.  
  117. Wayne Brissette <wayneb@apple.com>
  118.  
  119.  
  120. 1. General
  121. 1.1 What is QuickTime?
  122.  
  123. QuickTime offers several tools for adding video, animation, sound, and
  124. other time-based data to applications.  QuickTime also ensures that
  125. developers can create code and data for it now, and not have to scrap the
  126. work when QuickTime takes advantage of new technology later.
  127.  
  128. Apple engineers designed QuickTime to meet the Macintosh computer future
  129. needs.  In particular, the Component Manager enables your program to choose
  130. needed services in an implementation-independent way.  For example, you can
  131. write a QuickTime program to use the best image compression to which it has
  132. access.  Today it can get the job done with one of Apple's software-only
  133. compression components.  Later, you can to put in a third-party hardware-
  134. compression card, and the program will be able to make use of it, even
  135. though the program was written before the compression card was designed.
  136.  
  137. QuickTime is more than just a file format for video, it is more of a
  138. technology. QuickTime 2.0 for the Macintosh (and soon for Windows), allows
  139. you to have Video, Sound, Timebase code, Text Tracks, Midi music Tracks all
  140. in one file. QuickTime 2.0 also supports multiple Codecs, including MPEG.
  141. However, QuickTime 2.0's implementation of MPEG does require an actual MPEG
  142. board. It is not done through software decompression.
  143.  
  144. QuickTime is available for the Macintosh, MS-Windows, SGI, FM-TOWNS (Japan).
  145.  
  146. 1.2 Where to get documentation about the QuickTime file format?
  147.  
  148. Apple made the specification of the QuickTime movie file format public. The
  149. format is published in the Inside Macintosh series, and Apple is also
  150. working closely with developers in the hope that the QuickTime movie format
  151. will become an industrywide standard for time-based data for the Macintosh
  152. and other computer platforms. The Inside Macintosh books are available at
  153. most book stores. The format is also available as part of the QuickTime
  154. Developer's Kit from APDA. There are two kits, one for the Macintosh, and
  155. one for Microsoft Windows.
  156.  
  157.  
  158. 2. QuickTime software
  159. 2.1 Macintosh
  160.  
  161. QuickTime is available as a system extension for Mac and is shipped with the
  162. current OS version (System7) [correct?]. The file is available as
  163. ftp://ftp.support.apple.com/pub/Apple%20SW%20Updates/Macintosh/Supplemental%20System%20Software/QuickTime%20(1.6.2).hqx
  164.  
  165. 2.2 PC/MS-Windows
  166.  
  167. QuickTime for Windows is available as commercial product from Apple. The
  168. program is also included in a couple of CD-ROM games that use QuickTime to
  169. play their animations (e.g. Critical Path, Myst etc.). The QuickTime player
  170. is not redistributable due to copyright restrictions. The program is
  171. available as
  172. ftp://ftp.support.apple.com/pub/Apple%20SW%20Updates/Macintosh/Supplemental%20System%20Software/QuickTime for Windows (1.1.1).hqx
  173. This file is a hqx'ed file that contains a self-extracting DiskDoubler archive
  174. containing two disk images. This file is not extractable on non-Mac computers,
  175. since the version of DiskDoubler is not supported by non-Mac software [info,
  176. anyone?]. You will either need a Mac or a Mac emulator to execute the sfx
  177. archive.
  178.  
  179. After decoding the archive, you get two disk images that either can be
  180. written to disk (3 1/2 HD)
  181.  
  182. - Mac using DiskCopy
  183.  
  184. To install and use Apple DiskCopy 4.2, follow these steps:
  185.  
  186. 1) Copy the DiskCopy 4.2 folder to your hard drive.
  187.  
  188. 2) Open the DiskCopy 4.2 folder and double-click the DiskCopy application
  189.    icon.
  190.  
  191. 3) The title screen appears; click the mouse to continue.
  192.  
  193. 4) The main screen appears; click the Load Image File... button.  (As
  194.    an alternative, from the File menu, you can select Load Disk Image or
  195.    press Command-L.)  A file selection dialog box appears.
  196.  
  197. 5) Choose the image file you want to copy to floppy disk.
  198.  
  199. 6) Click the Open button. A message appears: "Reading the master disk
  200.    image into memory..." After the image is loaded into memory, the Make A
  201.    Copy button is highlighted.
  202.  
  203. 7) Click the Make A Copy button and a prompt appears: "Please insert a
  204.    disk to COPY ONTO..."
  205.  
  206. 8) Insert a floppy disk (formatted or unformatted) into the main floppy
  207.    drive. This message appears: "Now copying and verifying a disk..."
  208.  
  209.    If there is already data on the disk, a beep sounds and a dialog box
  210.    appears.  If it's okay to write over the disk, click the Duplicate
  211.    button. Otherwise, click the Eject button.  If you eject the disk, the
  212.    main screen reappears.  Click the Make A Copy button again and insert a
  213.    different disk.
  214.  
  215.    When the image file has been transferred to the floppy disk, the disk
  216.    automatically ejects.
  217.  
  218. 9) For each image file you want to put on floppy disk, repeat steps
  219.    4-8. When you are finished, click the Quit button.  (You also can
  220.    select Quit from the File menu or press Command-Q.)
  221.  
  222.  
  223. Hints and Help
  224. --------------
  225. - To launch Apple DiskCopy 4.2 and load the image file into memory at
  226.   the same time, double-click the image file icon.
  227.  
  228. - PC using the following C program (BorlandC):
  229.  
  230. /* NOTE: this program doesn't have any safety precautions for */
  231. /*       overwriting disks */
  232.  
  233. #include <stdio.h>
  234. #include <stdlib.h>
  235. #include <dos.h>
  236.  
  237. /* #define DRIVE 0 /* A */
  238. #define DRIVE 1 /* B */
  239.  
  240. char buffer[36*512];
  241.  
  242. int main(int argc, char *argv[])
  243. {
  244.   FILE *file;
  245.   int i;
  246.  
  247.   if(argc!=2) {
  248.     fprintf(stderr, "usage: hd3write imagefile\n");
  249.     exit(1);
  250.   }
  251.  
  252.   if((file=fopen(argv[1],"rb"))==NULL) {
  253.     perror(argv[1]);
  254.     exit(1);
  255.   }
  256.   if(fread(buffer, 1, 84, file)!=84) {    /* skip header */
  257.     perror("fread");
  258.     exit(1);
  259.   }
  260.  
  261.   for(i=0;i<80;i++) {
  262.     if(fread(buffer, 1, 512*36, file)!=512*36) {
  263.       perror("fread");
  264.       exit(1);
  265.     }
  266.     if(abswrite(DRIVE, 36, 36*i, buffer)) {
  267.       perror("abswrite");
  268.       exit(1);
  269.     }
  270.   }
  271.   fclose(file);
  272.   printf("Disk written successfully...\n");
  273.   return 0;
  274. }
  275.  
  276. - unix using dd. skip the first 84 bytes and write the file directly to the
  277. disks.
  278.  
  279. Due to the copyright restriction of Apple, it is not allowed to redistribute
  280. the program, neither as hqx nor as decoded file.
  281.  
  282. Maybe the program is archived on some sites, but I will not mention sites,
  283. since this might cause legal trouble (for the site operators). Try archie.
  284.  
  285. 2.2.1 Sample ftp session: (using a unix ftp client)
  286.  
  287. ~/tmp/ % ftp ftp.support.apple.com
  288. Connected to ftp.support.apple.com.
  289. (welcome message)
  290. 220 ftp.support.apple.com FTP server (Version wu-2.1c(1) Tue Mar 29 16:39:51 PST 1994) ready.
  291. Name (ftp.support.apple.com:alexlehm): ftp
  292. 331 Guest login ok, send your complete e-mail address as password.
  293. Password: user@system.firm.com (use your address here)
  294. (another welcome message)
  295. 230 Guest login ok, access restrictions apply.
  296. ftp> cd "pub/Apple SW Updates/Macintosh/Supplemental System Software"
  297. 250 CWD command successful.
  298. ftp> get "QuickTime for Windows (1.1.1).hqx" qtw111.hqx
  299. 200 PORT command successful.
  300. 150 Opening BINARY mode data connection for QuickTime for Windows (1.1.1).hqx (2238138 bytes).
  301. 226 Transfer complete.
  302. 2238138 bytes received in ss.ss seconds (k.kk Kbytes/s)
  303. ftp> bye
  304. 221 Goodbye.
  305.  
  306. Be sure to also read the License Agreement in /pub/Apple SW Updates.
  307.  
  308.  
  309.  
  310. 2.3 unix/X11
  311.  
  312. A program for playing QuickTime movies, including sound on some platforms
  313. under unix/X11 is called xanim, available at
  314. ftp://ftp.shell.portal.com/pub/podlipec/xanim*.tar.gz.
  315. This program is updated very frequently at this site. A maybe more stable
  316. older version is available from the X11R5 contrib mirrors.
  317.  
  318.  
  319. 3. Macintosh file formats
  320.  
  321. First of all, Macintosch files usually consist of two files, a resource fork
  322. and a data fork.
  323.  
  324. 3.1 QuickTime
  325.  
  326. A QuickTime movie can be in two forms, unflattened or flattened. An
  327. unflattened file has part of the data necessary for displaying the movie
  328. stored in the data fork, which means that the file is not playable when the
  329. resource fork is removed (e.g. on QuickTime for Windows or when transfering
  330. via ftp). A flattened movie has no necessary data in the resource fork,
  331. which means that the file can be played when only the data fork is available.
  332.  
  333. The two variations can be distinguished by the first 4 bytes in the file:
  334.  
  335. Unflattened file:
  336. 00000000: 00 00 00 00 6d 64 61 74    ....mdat
  337.  
  338. Flattened file:
  339. 00000000: hh hh hh hh 6d 64 61 74    !"$%mdat
  340.  
  341. (hhhhhhhh big-endian hex number slighly less that the filesize)
  342.  
  343.  
  344. QuickTime movies can also contain references to other files (in addition
  345. to the data in the resource fork), which are not supported by e.g. Windows.
  346. This means that even if the file header indicates the movie as flat, it
  347. might still be unusable on non-Mac systems (or even on Macs, if the files
  348. pointed to are missing or the movie references itself and is renamed).
  349. Most QT software has options to save files for non-Mac playback, which will
  350. put all data into one file. This is also referred to flattening.
  351.  
  352. 3.2 BinHex (hqx)
  353.  
  354. The BinHex format encodes data and resource fork of a file in a 7bit ASCII
  355. format (like uuencode). The file includes a CRC, allowing transmission
  356. errorchecking.
  357.  
  358. A hqx'ed file starts with something like
  359.  
  360. (This file must be converted with BinHex 4.0)
  361.  
  362. The data lines are usually 65 chars long and the first line starts with a
  363. colon.
  364.  
  365. 3.3 MacBinary
  366.  
  367. MacBinary files combine data and resource fork in a single file for binary
  368. trasmission. Several MacBinary file can be concatenated to form a MacBinary
  369. stream.
  370.  
  371. A MacBinary file starts with a 128 bytes header, which includes the filename,
  372. the creator and type of the file, file date, etc. The data fork starts at
  373. offset 128 and the resource fork after the data fork. Both data and resource
  374. fork are padded to a multiple of 128 bytes.
  375.  
  376. The header starts with a zero byte, then the length of the filename (1 byte)
  377. and the filename. The file type and creator appear at offset 65 (0x41). The
  378. length of data and resource fork are at offset 83 (0x53) and 87 (0x57).
  379.  
  380. Example:
  381.  
  382. 00000000: 00 0a 48 61 6b 75 6e 61:2e 73 69 74 00 00 00 00 |@JHakuna.sit@@@@|
  383. 00000010: 00 00 00 00 00 00 00 00:00 00 00 00 00 00 00 00 |@@@@@@@@@@@@@@@@|
  384. 00000020: 00 00 00 00 00 00 00 00:00 00 00 00 00 00 00 00 |@@@@@@@@@@@@@@@@|
  385. 00000030: 00 00 00 00 00 00 00 00:00 00 00 00 00 00 00 00 |@@@@@@@@@@@@@@@@|
  386. 00000040: 00 53 49 54 44 53 49 54:21 00 00 00 00 00 00 00 |@SITDSIT!@@@@@@@|
  387. 00000050: 00 00 00 00 1f 14 b4 00:00 00 00 aa 2f df fa aa |@@@@_T.@@@@./...|
  388. 00000060: 2f e0 25 00 00 00 00 00:00 00 00 00 00 00 00 00 |/.%@@@@@@@@@@@@@|
  389. 00000070: 00 00 00 00 00 00 00 00:00 00 81 81 78 4b 00 00 |@@@@@@@@@@..xK@@|
  390. 00000080: 53 49 54 21 00 01 00 1f:14 b4 72 4c 61 75 02 fc |SIT!@A@_T.rLauB.|
  391.  
  392. Filename Hakuna.sit (10 chars), file type StuffIT Deluxe, creator StuffIT!.
  393. Data fork is 2036916 bytes, resource fork is empty. The data fork starts at
  394. offset 0x80 with the archive data.
  395.  
  396. 3.4 Segmented files
  397.  
  398. Each part of a segmented file starts with a 100 byte header.
  399. The part number is at offset 3 (byte), the length of the name and the name
  400. at offset 4, the file type and create at offset 68, the length of resource
  401. and data fork at offset 86 and 90. The resource fork and data fork are stored
  402. after each other without padding and each part contains the 100 byte header.
  403.  
  404. 3.5 Stuffit
  405.  
  406. A StuffIt file can either be a regular archive or be self-extracting. The
  407. data fork starts with magic "SIT!".
  408.  
  409. A regular archive has type SIT! (StuffIT!) or SITD (StuffIT Deluxe) and
  410. creator SIT!. A self-extracting archive has type APPL and creator aust.
  411. The data forks starts with SIT!.
  412.  
  413. 3.6 Compact Pro
  414.  
  415. A Compact Pro archive can be regular and self-extracting. A regular archive
  416. has type PACT and creator CPCT. A self-extracting achive has type APPL and
  417. creator EXTR. The data fork starts with 0x0101.
  418.  
  419. A segemented Compact Pro archive, the parts start with 0x0101, 0x0102,
  420. etc.
  421.  
  422.  
  423. 4. Decoder/Converter software
  424. 4.1 Macintosh
  425.  
  426. Macintosh decoders are available from
  427. ftp://sumex-aim.stanford.edu/info-mac/cmp
  428. ftp://mac.archive.umich.edu/mac/util/compression
  429.  
  430. UnStuff, Compact Pro, FileTyper, UULite, etc.
  431.  
  432. 4.2 PC/DOS
  433.  
  434. DOS programs for Mac files are available from
  435. ftp://oak.oakland.edu/pub/msdos/mac.
  436.  
  437. binhex13.zip: en/decodes BinHex 4.0 (HQX) files. Extracts only data fork,
  438.               not useful for unflattened files.
  439. macb10.zip: add/remove MacBinary headers, doesn't separate data/resouce fork,
  440.             not useful for unflattened files.
  441. unpakit.zip: extracts packed (.pit) files. (Probably no longer used)
  442. unsit30.zip: extracts .sit archives. Can extract data and resource fork
  443.              separately. Doesn't support all compression types.
  444. unstufit.zip: extracts .sit archives. [Maybe I'm doing something wrong, but
  445.               this one didn't work with the sample sits I had]
  446. xbin23.zip: extracts HQX files. extracts data and resource fork.
  447.  
  448. There is also a free unstuff program from Aladdin (the company that sells
  449. StuffIt), but I don't have an archive site for this.
  450.  
  451. 4.3 unix
  452.  
  453. A collection of Mac conversion programs is called macutil, which is available
  454. >from ftp://sol.cs.ruu.nl/pub/UNIX/macutil2.0b3.tar.gz [fixme] or
  455. ftp://sumex-aim.stanford.edu/info-mac/unix/macutil-20b1.shar
  456.  
  457. A precompiled binary of this program is also available in the Linux
  458. distribution.
  459.  
  460.  
  461. 5. Exchanging QuickTime files between Mac and other platforms
  462.  
  463. When creating a QuickTime movie, you can select a format suitable for
  464. playing on non-Mac systems, which will create a flat movie.
  465. If a movie is unflat, it can be fixed with qtflat (on DOS), if both data
  466. and resource fork are available.
  467.  
  468. ftp://ftp.rahul.net/pub/hkok/msdos/viewer/qtflat11.zip
  469.  
  470. A C program for this is also available
  471. ftp://ftp.shell.portal.com/pub/podlipec/flatten.c.Z
  472.  
  473.  
  474. If you want to distribute a QuickTime movie (e.g. via news), you should
  475. try to observe the following:
  476.  
  477. - distribute the file in flattened form only or use MacBinary or StuffIt to
  478.   include the resource fork.
  479. - don't use StuffIt with compression methods not supported by macutil.
  480.   (e.g. type 0d, probably a StuffItDeluxe method)
  481. - if you ship the file in a non-Mac format (e.g. zip), be sure to include the
  482.   necessary filetype and creator so that Mac users can fix these entries.
  483.  
  484.  
  485. 6. Where to get QuickTime movies
  486.  
  487. First of all, news:alt.binaries.multimedia, if your site carries this group.
  488.  
  489. ftp://sumex-aim.stanford.edu/info-mac/grf/qt (usually not mirrored)
  490.  
  491. ftp://mac.archive.umich.edu:/mac/graphics/quicktime (also contains some
  492. QuickTime utilities)
  493.  
  494. http://www.portal.com/~podlipec/home.html  contains a list of pointers to
  495. various movie sites, including some with QuickTimes.
  496.  
  497. gopher://csc.ucs.uwplatt.edu/1d-1%3a1163%3aQuicktime
  498.  
  499. This site contains a couple of movies, including one called 1984, which is
  500. rather large (>12MB), as a segmented StuffIt archive.
  501.  
  502. [I have tried to get this file using a unix gopher client, but haven't been
  503. able to decode the file yet. If I figure out how to do this, the procedure
  504. will be here.]
  505.  
  506.  
  507. -- 
  508. Alexander Lehmann,                               |  "On the Internet,
  509. alex@hal.rhein-main.de  (plain, MIME, NeXT)      |   nobody knows
  510. alexlehm@iti.informatik.th-darmstadt.de (plain)  |   you're a dog."
  511.  
  512.